<title>微信平台视频付费系统</title>



<link rel="stylesheet" href="/assets/assets(home)/css/swiper-bundle.css">
<link rel="stylesheet" href="/assets/assets(home)/css/index.css" />
<script src="/assets/assets(home)/js/swiper-bundle.min.js"></script>

<!-- 轮播图 -->
{if condition="$top"}
<div class="mui-content">
    <div class="swiper mySwiper">
        <div class="swiper-wrapper">
            {foreach $top as $item}
            <div class="swiper-slide">
                <a href="">
                    <img src="{$item.thumbs}">
                    <p class="mui-slider-title">{$item.title}</p>
                </a>
            </div>
            {/foreach}
        </div>
        <div class="swiper-pagination" style="text-align: right;"></div>
    </div>
</div>
{/if}

<!-- 菜单栏 -->
<div class="menulist">
    <div class="item">
        <a href="live.html">
            <img src="/assets/assets(home)/images/live.png" alt="">
            <div class="name">课程直播</div>
        </a>
    </div>

    <div class="item">
        <a href="{:url('home/Comment/comment_list')}">
            <img src="/assets/assets(home)/images/comment.png" alt="">
            <div class="name">学员评论</div>
        </a>
    </div>

    <div class="item">
        <a href="{:url('home/Ranking/ranking')}">
            <img src="/assets/assets(home)/images/ranking.png" alt="">
            <div class="name">课程榜单</div>
        </a>
    </div>

    <div class="item">
        <a href="{:url('home/coupon/coupon_list')}">
            <img src="/assets/assets(home)/images/coupon.png" alt="">
            <div class="name">领取优惠</div>
        </a>
    </div>
</div>


<!-- 精选课程 -->
{if condition="$subject"}
<div class="list">
    <div class="title">精选课程</div>
    <ul>
        {foreach $subject as $item}
        <li>
            <a href="{:url('home/search/details',['subid' => $item['id']])}">
                <div class="imgs">
                    <img class="mui-media-object" src="{$item.avatar_text}">
                </div>
                <div class="mui-media-body">{$item.title}</div>

                <div class="info">
                    <div class="price">￥{$item.price}</div>
                    <div class="like" id="like">
                        {$item.likes_text}
                        <img src="
                        {if ($item['likes_text']) == 0}
                        /assets/assets(home)/images/thumbs.png
                        {elseif ($item['likes_text']) > 0}
                        /assets/assets(home)/images/thumbs-up.png
                        {/if}
                        " alt="">
                    </div>
                </div>
            </a>
        </li>
        {/foreach}
    </ul>
</div>
{/if}

<!-- 精选名师 -->
{if condition="$teacher"}
<div class="list teacher">
    <div class="title">精选名师</div>
    <ul>
        {foreach $teacher as $item}
        <li>
            <a href="{:url('home/teacher/teacher_info',['teacherid' => $item['id']])}">
                <div class="imgs">
                    <img class="mui-media-object" src="{$item.avatar_text}">
                </div>
                <div class="mui-media-body">{$item.name}</div>
                <div class="info">
                    <div class="num">课程：{$item.count_text}</div>
                    <div class="like">
                        {$item.follows_text}
                        <img src="
                        {if ($item['follows_text']) == 0}
                        /assets/assets(home)/images/rate.png
                        {elseif ($item['follows_text']) > 0}
                        /assets/assets(home)/images/rate_active.png
                        {/if}
                        " alt="">
                    </div>
                </div>
            </a>
        </li>
        {/foreach}

    </ul>
</div>
{/if}

<!-- 底部 -->
{include file="common/footer"}

<script>
    var swiper = new Swiper(".mySwiper", {
        pagination: {
            el: ".swiper-pagination",
        },
    });

    //修改浏览器自带的后退按钮
    window.history.pushState(null, null, ``);

    window.addEventListener('popstate', function (e) {
        e.preventDefault()
        location.href = `{:url('/home/index/index')}`
    }, false)
</script>